package cn.tedu.boot1.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class BMIController {
    @RequestMapping("/bmi")
    public String bim(float height,float weight){
        System.out.println("height = " + height + ", weight = " + weight);
        float BMI = weight / (height * height);
        if (BMI<18.5){
            return "偏瘦";
        }else if (BMI>24){
            return "超重";
        }else {
            return "正常";
        }
    }
}
